﻿@model MrCMS.Entities.Documents.Media.MediaCategory 
@{
    ViewBag.Title = "Add media category";
    Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
}
@section JavaScriptBlock
{
    <script type="text/javascript" src="@Url.Content("~/Areas/Admin/Content/Scripts/mrcms/add-category.js")"></script>
}

@using (Html.BeginForm("Add", "MediaCategory", new { id = "" }, FormMethod.Post, new { id = "add-media-category" }))
{
    <fieldset>
        <legend>@Resource("Admin Folders Add Title", "Add Folder")
            <button class="btn pull-right btn-primary">
                @Resource("Add")</button>
        </legend>
        <div class="row">
            <div class="col-lg-12">
                @Html.HiddenFor(x => x.Parent.Id)
                @Html.HiddenFor(x => x.Parent.UrlSegment)
                <div class="form-group">
                    @Html.LabelFor(x => x.Name, "Folder Name")
                    @Html.TextBoxFor(x => x.Name, new { @class = "form-control" })
                    @Html.ValidationMessageFor(x => x.Name, "", new { @class = "error" })
                </div>
                <div class="form-group">
                    @Html.LabelFor(x => x.UrlSegment, "Path")
                    @Html.TextBoxFor(x => x.UrlSegment, new { @class = "form-control" })
                    @Html.ValidationMessageFor(x => x.UrlSegment, "", new { @class = "error" })
                </div>
                <br />
                @Html.Hidden("DocumentType", "MediaCategory")
            </div>
        </div>
    </fieldset>
}
